package org.gwh.airagknowledge.repository;

import org.gwh.airagknowledge.entity.QAHistory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface QAHistoryRepository extends JpaRepository<QAHistory, Long> {
    
    Page<QAHistory> findAllByOrderByCreatedAtDesc(Pageable pageable);
    
    Page<QAHistory> findByQuestionContainingIgnoreCaseOrderByCreatedAtDesc(String question, Pageable pageable);
} 